<template>
    <div class="upload-container">
        <el-button
            :style="{background:backgroundColor,borderColor:borderColor,color:fontColor}"
            icon="el-icon-upload"
            size="mini"
            type="primary"
            @click="dialogVisible=true"
        >
            上传
        </el-button>
        <el-dialog :modal="false" :visible.sync="dialogVisible">
            <el-form-item label="上传图片">
                <upload-image v-model="tinymceData.photos" :fileLimit="imageLimit" />
            </el-form-item>
            <el-form-item label="上传视频">
                <upload-video v-model="tinymceData.videos" :fileLimit="videoLimit" />
            </el-form-item>
        </el-dialog>
    </div>
</template>

<script>
import UploadVideo from '@/components/uploadVideo'

export default {
	name: 'EditorSlideUploadImageAndVideo',
    components: { UploadVideo },
	props: {
		fontColor: {
			type: String,
			default: '#303133'
		},
        backgroundColor: {
        	type: String,
        	default: '#ffffff'
        },
        borderColor: {
        	type: String,
        	default: '#dcdfe6'
        },
        imageLimit: {
        	type: Number,
        	default: 6
        },
        videoLimit: {
        	type: Number,
        	default: 3
        }
	},
	data() {
		return {
			dialogVisible: false,
            tinymceData: {
                photos: [],
                videos: []
            }
		}
	},
	methods: {

	}
}
</script>

<style lang="scss" scoped>

</style>
